<!doctype html>
<html lang="zh-CN">

<head>
	<meta charset="{dede:global.cfg_soft_lang/}">
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
	<script>
		const PHPURL = '{dede:field name="phpurl"/}';
	</script>
	<script src="{dede:global.cfg_cmsurl/}/static/js/jquery.min.js"></script>
	<script src="{dede:global.cfg_cmsurl/}/static/js/bootstrap.bundle.js"></script>
	<link rel="stylesheet" href="{dede:global.cfg_cmsurl/}/static/css/bootstrap.min.css">
	<link href="{dede:global.cfg_cmsurl/}/static/font-awesome/css/font-awesome.min.css" rel="stylesheet">
	<link rel="stylesheet" href="{dede:global.cfg_cmsurl/}/static/css/dede.css">
	<link rel="shortcut icon" href="{dede:global.cfg_cmsurl/}/static/img/favicon.png">
	<title>{dede:field.title/}_{dede:global.cfg_webname/}</title>
	<meta name="keywords" content="{dede:field.keywords/}" />
	<meta name="description" content="{dede:field.description function='html2text(@me)'/}" />
	<script>
		var shortname = "{dede:global.art_shortname/}";
		var npage = {dede:field name='nowpage' /};
		var totalpage = {dede:field name='totalpage' /};
		var namehand = '{dede:field name='namehand'/}';
		var displaytype = '{dede:field name='displaytype'/}';
		var gtimer = null;
		//大图
		function dPlayBig() {
			var imgObj = document.getElementById("bigimg");
			window.open(imgObj.src);
		}
		//停止幻灯
		function dStopPlay() {
			if (gtimer) clearTimeout(gtimer);
			else dPlayNext();
		}
		//开始幻灯
		function dStartPlay() {
			if (npage != totalpage) {
				gtimer = setTimeout("dPlayNext()", 10000);
			}
		}

		//上一张
		function dPlayPre() {

			if (npage < 2) {
				ShowMsg("这是第一页");
			}
			else {
				if (npage == 2) {
					if (namehand != '') location.href = namehand + shortname;
					else location.href = "view.php?aid={dede:field name='id'/}";
				} else if (displaytype == 'st' && namehand != '') {
					location.href = namehand + "_" + (npage - 1) + shortname;
				} else {
					location.href = "view.php?aid={dede:field name='id'/}&pageno=" + (npage - 1);
				}
			}
		}

		//下一张
		function dPlayNext() {
			if (npage == totalpage) { ShowMsg("没有了哦"); }
			else {
				if (displaytype == 'st' && namehand != '') location.href = namehand + "_" + (npage + 1) + shortname;
				else location.href = "view.php?aid={dede:field name='id'/}&pageno=" + (npage + 1);
			}
		}
	</script>
</head>

<body>
	{dede:include filename="top.htm"/}

	{dede:include filename="header.htm"/}

	{dede:include filename="navbar.htm"/}

	<div class="container">
		<div class="position">
			<nav aria-label="breadcrumb">
				<ol class="breadcrumb mb-0">
					<li class="breadcrumb-item">当前位置</li>
					{dede:field name='position'/}
				</ol>
			</nav>
		</div>
		<!-- /.position -->
	</div>

	<main class="container">
		<div class="row">
			<div class="col-md-8 article-main">
				<h2 class="mt-0 mb-3 zixue">{dede:field.title/}</h2>
				<div class="article-meta">
					<small>时间：</small>{dede:field.pubdate function="MyDate('Y-m-d',@me)"/}
					<small>来源：</small>{dede:field.source/}
					<small>作者：</small>{dede:field.writer/}
					<small>点击：</small><span id="_count">...</span>次
				</div>

				<div class="picbox">

					{dede:field name='pagestyle' alt='根据不同的页面风格输出不同的头信息' runphp='yes'}
					if(@me==3) {
					@me = '<ul class="e8">';
						}
						else if(@me==2) {
						@me = "
						<div class='mt-3 mb-3 text-center'>
							<a href='javascript:dPlayBig();' class='btn btn-success'>原始图片</a>\r\n
							<a href='javascript:dPlayPre();' class='btn btn-success'>上一张</a>\r\n
							<a href='javascript:dPlayNext();' class='btn btn-success'>下一张</a>\r\n
							<a href='javascript:dStopPlay();' class='btn btn-success'>自动 / 暂停播放</a>\r\n
						</div>
						";
						}
						else {
						@me = '';
						}
						{/dede:field}
						<!-- 如果使用的是多页单图模式(幻灯)，把href里的链接改为 javascript:dPlayNext(); 表示点击看下一页 -->
						{dede:field name='imgurls' alt='图片输出区'}
						[field:pagestyle runphp='yes'] @me= (@me==3 ? '<li>' : '');[/field:pagestyle]
							<a href='[field:linkurl/]' [field:pagestyle runphp='yes' ] @me=(@me==3 ? 'class="pic"' : ''
								); [/field:pagestyle]>
								<img src='[field:imgsrc/]' id='bigimg' [field:imgwidth /] alt='[field:alttext /]'
									border='0' />
							</a>
							<a href='[field:linkurl/]' [field:pagestyle runphp='yes' ]@me=(@me==3 ? 'class="title"' : ''
								);[/field:pagestyle]>
								[field:title /]
							</a>
							[field:pagestyle runphp='yes'] @me = (@me==3 ? '</li>' : ''); [/field:pagestyle]
						{/dede:field}

						{dede:field name='pagestyle' alt='根据不同的风格输出不同的结尾信息' runphp='yes'}
						if(@me==3) {
						@me = '</ul>';
					}
					else if(@me==2) {
					@me = "
					<script language='javascript'>dStartPlay();</script>\r\n";
					}
					else {
					@me = '';
					}
					{/dede:field}
				</div>

				<div class="body py-2">
					{dede:field.body/} (责任编辑：{dede:adminname/})
				</div>
				<!-- /.body -->

				<div class="clearfix"></div>

				{dede:include comment='文档顶踩模块' filename="widget_article_digg.htm"/}

				<div class="row">
					<div class="col-md-4 prenext pt-2">
						<div class="pagination-previous">{dede:prenext get='pre'/}</div>
						<div class="pagination-next mt-2">{dede:prenext get='next'/}</div>
					</div>
					<div class="col-md-8">
						<div class="row actbox">
							<ul>
								<li><i class="fa fa-star-o" aria-hidden="true"></i> <a
										href="{dede:field name='phpurl'/}/stow.php?aid={dede:field.id/}"
										target="_blank">收藏</a></li>
								<li><i class="fa fa-bug" aria-hidden="true"></i> <a
										href="javascript:ErrorAddSave({dede:field.id/}, '{dede:field.title/}');">挑错</a>
								</li>
								<li><i class="fa fa-thumbs-o-up" aria-hidden="true"></i> <a
										href="{dede:field name='phpurl'/}/recommend.php?aid={dede:field.id/}"
										target="_blank">推荐</a></li>
								<li><i class="fa fa-print" aria-hidden="true"></i> <a href="#"
										onClick="window.print();">打印</a></li>
							</ul>
						</div><!-- /actbox -->
					</div>
				</div>

				{dede:include comment='文档评论模块' file='widget_article_feedback.htm' /}

			</div>
			<!-- /.article-main -->

			<aside class="col-md-4 article-sidebar">

				{dede:include comment='推荐内容' filename="widget_recommend.htm"/}

				{dede:include comment='热点内容' filename="widget_hot.htm"/}

				{dede:include comment='QR二维码' filename="widget_qrcode.htm"/}

			</aside>
			<!-- /.article-sidebar -->

		</div>
	</main>
	<!-- /main -->

	{dede:include filename="footer.htm"/}
	<script>


		// 页面加载触发
		$(document).ready(function () {
			// 获取文档点击数统计
			$.get("{dede:field name='phpurl'/}/count.php?format=json&view=yes&aid={dede:field.id/}&mid=1&cid={dede:field.channel/}", function (data) {
				let result = JSON.parse(data);
				$("#_count").html(result.data.click);
			})
		});
	</script>
</body>

</html>